﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace Mimoza.SystemPlugin
{
    [Flags]
    public enum ShortcutBitmask : uint
    {
        None = 0,
        MyComputer = 0x1,
        RecycleBin = 0x2,
        InternetExplorer = 0x4,
        DefaultRDP = 0x8
    }

    public class SystemPluginData : PluginsLayer.PluginDataGeneric<SystemPluginData>
    {
        public const int c_DefaultNetworkActivityLevel = 7;
        public const int c_MaxNetworkActivityLevel = 10;

        public bool IsServiceDisable
        {
            get { return m_isServiceDisable; }
            set { m_isServiceDisable = value; }
        }

        public bool IsNewServiceSelected
        {
            get { return m_isNewServiceSelected; }
            set { m_isNewServiceSelected = value; }
        }

        public string NewServiceAddress
        {
            get { return m_newServiceAddress; }
            set { m_newServiceAddress = value; }
        }

        public int NetworkActivityLevel
        {
            get { return m_networkActivityLevel; }
            set 
            {
                m_networkActivityLevel = value; 

                if (m_networkActivityLevel <= 0) m_networkActivityLevel = 1;
                if (m_networkActivityLevel > c_MaxNetworkActivityLevel) 
                    m_networkActivityLevel = c_MaxNetworkActivityLevel;
            }
        }

        public string Password
        {
            get { return m_password; }
            set { m_password = value; }
        }

        public bool HasProtectionOnStartup
        {
            get { return m_hasProtectionOnStartup; }
            set { m_hasProtectionOnStartup = value; }
        }

        public bool HasProtectionOnScreenSaver
        {
            get { return m_hasProtectionOnScreenSaver; }
            set { m_hasProtectionOnScreenSaver = value; }
        }   

        public ShortcutBitmask ShownShortcutBitMask
        {
            get { return m_shownShortcutBitMask; }
            set { m_shownShortcutBitMask = value; }
        }

        bool m_isServiceDisable = false;
        bool m_isNewServiceSelected = false;
        string m_newServiceAddress;
        int m_networkActivityLevel = c_DefaultNetworkActivityLevel;

        string m_password;
        bool m_hasProtectionOnStartup = false;
        bool m_hasProtectionOnScreenSaver = false;

        ShortcutBitmask m_shownShortcutBitMask = 0;
    }
}
